.TH E1432_SET_DUTY_CYCLE 3 E1432
.SH NAME
.nf
e1432_set_duty_cycle \- Set source burst duty cycle
e1432_get_duty_cycle \- Get source burst duty cycle
.fi
.IX e1432_set_duty_cycle(3) 3
.IX e1432_get_duty_cycle(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_duty_cycle(E1432ID hw, SHORTSIZ16 ID,
                                FLOATSIZ32 duty_cycle)
SHORTSIZ16 e1432_get_duty_cycle(E1432ID hw, SHORTSIZ16 ID,
                                FLOATSIZ32 *duty_cycle)
.cE
.SH DESCRIPTION
\fIe1432_set_duty_cycle\fR sets the burst duty cycle for a source
channel.  This duty cycle is used only when the source mode (set by
\fIe1432_set_source_mode\fR) is a burst mode, such as
\fBE1432_SOURCE_MODE_BSINE\fR, or \fBE1432_SOURCE_MODE_BRAND\fR.

\fIe1432_get_duty_cycle\fR returns the current duty cycle for a single
channel or group of channels \fIID\fR, into a memory location pointed
to by \fIduty_cycle\fR.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained
with a call to \fIe1432_create_channel_group\fR, or the ID of a single
channel.

\fIduty_cycle\fR specifies the duty cycle for a burst.  The duty cycle
is a fraction that must be between zero and one.  The total burst
period is equal to the current blocksize; the duty cycle specifies the
fraction of that burst that the source is on.  If the source ramp rate
is non-zero, the source will ramp up and down \fIwithin\fR the
duty-cycle portion of the burst period.

Obviously, this function is not useful when talking to input or tach
channels.  Only source channels have a burst duty cycle.

.SH "RESET VALUE"
After a reset, \fIduty_cycle\fR is set to 0.5.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_blocksize, e1432_set_ramp_rate, e1432_set_source_mode
.ad
